package com.qf.controller.manager;

import com.github.pagehelper.PageInfo;
import com.qf.entitys.User;
import com.qf.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author:ztl
 * @Date:2023/01/31
 * @内容：
 */
@Controller
@RequestMapping("/manager/User")
public class UserController {
    @Resource
    private UserService service;

    @GetMapping("/list")
    public String list(User record, Integer pageindex, HttpServletRequest request){
        System.out.println("123");
        PageInfo<User> userPageInfo = service.selectAll(pageindex, record);
        request.setAttribute("pageInfo",userPageInfo);
        request.setAttribute("userName",record.getUserName());
        request.setAttribute("nickName",record.getNickName());
        return "manager/UserList";
    }


}
